package org.example.day2;


import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import java.util.Scanner;

@SpringBootApplication
public class Day2Application {

    public static void main(String[] args) {

/*        float f = 183.1F;
        double d = 183.1;
        char c = 'b';
        Long l = 123L;
        System.out.println('你');
        int salary = 1;
        System.out.println(333);
        salary = 3334;
        SpringApplication.run(Day2Application.class, args);*/


        // scanner
//        java.util.Scanner sc = new java.util.Scanner(System.in);
//        int age = sc.nextInt();
//        sc.next();
//        System.out.println(age);

        // scanner -test
//        System.out.println('s');
//        Scanner sc = new Scanner(System.in);
//        System.out.println("请输入姓名");
//        String name = sc.next();
//
//        System.out.println("请输入性别");
//        String gender = sc.next();
//
//        System.out.println("请输入身高");
//        Double h = sc.nextDouble();
//
//        System.out.println("请输入已婚");
//        boolean next = sc.nextBoolean();
 //  数字获取 个十百位
//        Scanner sc = new Scanner(System.in);
//        int i = sc.nextInt();
//        int bai = i / 100 % 10;
//        int shi = i / 10 % 10;
//        int ge = i  % 10;
//        System.out.println(bai);
//        System.out.println(shi);
//        System.out.println(ge);
//        System.out.println("5+5=" + 5 + 5);
/*        int x = 10;
        int y = x++;
        int z = ++x;

        System.out.println(x);// 12
        System.out.println(y);// 10
        System.out.println(z);// 12*/
/*        int a = 3;
        int b = (++a) + (a++) + (a*10);
        System.out.println("a="+a);
        System.out.println("b="+b);*/
/*        int a = 1;
        double b = a;
        System.out.println(b);

        double a1 = 1;
        int b1 = a1;
        System.out.println(b1);

        SpringApplication.run(Day2Application.class, args);*/
/*        long a = 123L;
        float b = a; // 因为float的取值范围大,所以可以赋值.
        System.out.println(b);*/
/*        int a = 10;
        double b = 22;
        double c = a+b; // 正确 - 用大的值
        int ee = a+b; // 报错
        System.out.println(a+b); // 32.0*/
/*        byte a= 'a'; // 码表97
        byte b = '2'; // 码表50
        int c = a+b; // 147 因为就算是char的a也是有字码表的值的,就用值来算. 就是a的字码表+ 字码表'2'
        System.out.println(c);*/
        /*
        double a = 12.3;
        // 这里告诉左侧数据,这里就是个int类型. 就是强制转换
        int b = (int)a; // 这里不是12.3,只是12   .3丢失了
        System.out.println(b);*/
        /*int a =10 ;
        byte b = (byte)a;
        System.out.println(b); // 这里还是10,就不丢失. 因为byte精度可以容纳10*/
/*        byte b1 = 3;
        byte b2 = 4;
        byte b3 = (byte)(b1 + b2);
        int b4 = b1 + b2;
        System.out.println(b3);
        System.out.println(b4);*/
/*        byte a = 300 + 4;
        System.out.println(a);*/
    }

}

































